import request from '@/utils/request'

/**
 * 获取合同立项详细
 *
 * @param data
 */
export function getContractInitiationListApi(data) {
    return request({
        url: '/api/contractInitiation/getById',
        method: 'post',
        data
    })
}

/**
 * 合同立项主表保存
 *
 * @param data
 */
export function saveContractInitiationApi(data) {
    return request({
        url: '/api/contractInitiation/save',
        method: 'post',
        data
    })
}

/**
 * 合同立项保存单条明细表
 *
 * @param data
 */
export function saveContractDetailApi(data) {
    return request({
        url: '/api/contractInitiation/saveDetail',
        method: 'post',
        data
    })
}

/**
 * 获取合同立项待办列表
 *
 * @param data
 */
export function getDoingListApi(data) {
    return request({
        url: '/api/contractInitiation/getDoingList',
        method: 'post',
        data
    })
}

/**
 * 合同立项保存
 *
 * @param data
 */
export function saveContractApi(data) {
    return request({
        url: '/api/contractInitiation/save',
        method: 'post',
        data
    })
}

/**
 * 获取供应商资质
 *
 * @param data
 */
export function getSupplierlistApi(data) {
    return request({
        url: '/api/project/getSupplierlist',
        method: 'post',
        data
    })
}

/**
 * 合同立项删除单条明细
 *
 * @param data
 */
export function deleteDetailApi(data) {
    return request({
        url: '/api/contractInitiation/deleteDetail',
        method: 'post',
        data
    })
}

/**
 * 获取合同立项流转意见
 *
 * @param data
 */
export function getRequestLogsApi(data) {
    return request({
        url: '/api/contractInitiation/getRequestLogs',
        method: 'post',
        data
    })
}

/**
 * 合同立项提交
 *
 * @param data
 */
export function submitContractApi(data) {
    return request({
        url: '/api/contractInitiation/submit',
        method: 'post',
        data
    })
}

/**
 * 合同立项批准
 *
 * @param data
 */
export function approveContractApi(data) {
    return request({
        url: '/api/contractInitiation/approve',
        method: 'post',
        data
    })
}

/**
 * 合同立项退回
 *
 * @param data
 */
export function rejectContractApi(data) {
    return request({
        url: '/api/contractInitiation/reject',
        method: 'post',
        data
    })
}
